<!-- 继承公共的 form -->
{{extend name="public/module/form" /}}

<!-- 扩展 -->
{{block name="form_extend"}}
    <!-- 取货弹窗 -->
    <div class="am-modal am-radius am-nbfc" tabindex="-1" id="order-take-modal">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">
                <a href="javascript: void(0)" class="am-close" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd">
                <form class="am-form form-validation-take" method="post" action="{{:MyUrl('admin/order/delivery')}}" request-type="ajax-reload">
                    <div class="am-form-group am-form-group-refreshing am-margin-bottom-0">
                        <label>取货码</label>
                        <input type="text" autocomplete="off" name="extraction_code" placeholder="取货码" minlength="4" maxlength="4" data-validation-message="请填写4位数取货码" class="am-radius" required />
                    </div>
                    <div class="am-form-group am-form-group-refreshing">
                        <input type="hidden" name="id" value="0" />
                        <input type="hidden" name="user_id" value="0" />
                        <button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!-- 发货弹窗 -->
    <div class="am-popup am-radius" id="order-delivery-popup">
        <div class="am-popup-inner">
            <div class="am-popup-hd">
                <h4 class="am-popup-title">发货操作</h4>
                <span data-am-modal-close class="am-close">&times;</span>
            </div>
            <div class="am-popup-bd">
                <form class="am-form form-validation-delivery am-form-popup-fixed" method="post" action="{{:MyUrl('admin/order/delivery')}}" request-type="ajax-reload">
                    <div class="business-list business-list-nbfc">
                        {{if !empty($express_list)}}
                            <ul class="am-avg-sm-2 am-avg-md-3 express-list" data-type="express">
                                {{foreach $express_list as $express}}
                                    {{if $express.is_enable eq 1}}
                                        <li class="am-padding-sm" data-value="{{$express.id}}">
                                            <div class="business-item am-nbfc am-padding-sm am-radius">
                                                {{if !empty($express.icon)}}
                                                    <img src="{{$express.icon}}" class="am-radius" />
                                                {{/if}}
                                                <span>{{$express.name}}</span>
                                                <div class="rotate"></div>
                                                <i class="am-icon-check"></i>
                                            </div>
                                        </li>
                                    {{/if}}
                                {{/foreach}}
                            </ul>
                        {{/if}}
                        {{if empty($express_list)}}
                            {{include file="public/not_data" /}}
                        {{/if}}
                    </div>

                    <div class="am-margin-top-sm">
                        <label>快递单号</label>
                        <input type="text" autocomplete="off" name="express_number" placeholder="快递单号" minlength="1" data-validation-message="请填写快递单号" class="am-radius" required />
                    </div>
                    
                    <div class="am-form-popup-submit">
                        <input type="hidden" name="id" value="0" />
                        <input type="hidden" name="express_id" value="0" />
                        <input type="hidden" name="user_id" value="0" />
                        <button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!-- 支付弹窗 -->
    <div class="am-popup am-radius" id="order-pay-popup">
        <div class="am-popup-inner">
            <div class="am-popup-hd">
                <h4 class="am-popup-title">支付操作</h4>
                <span data-am-modal-close class="am-close">&times;</span>
            </div>
            <div class="am-popup-bd">
                <form class="am-form form-validation-pay am-form-popup-fixed" action="{{:MyUrl('admin/order/pay')}}" method="POST" request-type="ajax-reload">
                    <div class="business-list business-list-nbfc">
                        {{if !empty($buy_payment_list)}}
                            <ul class="am-avg-sm-2 am-avg-md-3 payment-list" data-type="payment">
                                {{foreach $buy_payment_list as $payment}}
                                    <li class="am-padding-sm" data-value="{{$payment.id}}">
                                        <div class="business-item am-nbfc am-padding-sm am-radius">
                                            {{if !empty($payment.logo)}}
                                                <img src="{{$payment.logo}}" class="am-radius" />
                                            {{/if}}
                                            <span>{{$payment.name}}</span>
                                            <div class="rotate"></div>
                                            <i class="am-icon-check"></i>
                                        </div>
                                    </li>
                                {{/foreach}}
                            </ul>
                        {{/if}}
                        {{if empty($buy_payment_list)}}
                            {{include file="public/not_data" /}}
                        {{/if}}
                    </div>
                    <div class="am-form-popup-submit">
                        <input type="hidden" name="id" value="0" />
                        <input type="hidden" name="payment_id" value="0" />
                        <button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
{{/block}}